package com.example.yuxin.demo.service;

import java.util.List;

import com.example.yuxin.demo.vo.User;

/**
 * Description: <br>
 *
 * @author: name：yuxin <br>email: yuruixin@ixincheng.com <br>
 * Create Time:  2018/7/8 0008-下午 1:56<br>
 */
public interface UserService {

    /**
     *  创建一个用户
     * @param name
     * @param age
     * @return void
     * @author yuxin
     * @creed: Talk is cheap,show me the code
     * @date 2018/7/8 0008 下午 1:56
     */
    void create(String name, Integer age);

    /**
     * 根据姓名删除用户
     * @param name
     * @return void
     * @author yuxin
     * @creed: Talk is cheap,show me the code
     * @date 2018/7/8 0008 下午 1:57
     */
    void deleteByName(String name);

    /**
     * 获取所有用户
     * @param
     * @return java.lang.Integer
     * @author yuxin
     * @creed: Talk is cheap,show me the code
     * @date 2018/7/8 0008 下午 1:57
     */
    Integer getAllUsers();
    List<User> getAllUserList();
    User getUserById(Long id);
    void updateUserById(Long id, String name, Integer age);

    /**
     * 删除所有用户
     * @param
     * @return void
     * @author yuxin
     * @creed: Talk is cheap,show me the code
     * @date 2018/7/8 0008 下午 1:57
     */
    void deleteAllUsers();

    void deleteById(Long id);
}
